package com.etbsms.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.etbsms.dao.ILogLoginDAO;
import com.etbsms.domain.LogLogin;
import com.etbsms.domain.Users;
import com.etbsms.service.ILogLoginService;

@Service
@Component("logLoginService")
public class LogLoginServiceImpl implements ILogLoginService {
	
	@Autowired
	private ILogLoginDAO logLoginDAO;	
	
	@Override
	public LogLogin get(int seq_no) {
		// TODO Auto-generated method stub
		return logLoginDAO.get(seq_no);
	}

	@Override
	public boolean save(LogLogin entity) {
		// TODO Auto-generated method stub
		entity.setLogin_time(new Date());
		return logLoginDAO.save(entity);
	}

	@Override
	public List<LogLogin> getUsersLoginLog(Users users) {
		// TODO Auto-generated method stub
		return logLoginDAO.getUsersLoginLog(users);
	}

}
